package com.eco.fanliapp.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.eco.fanliapp.dao.AppGoodsClassifyMapper;
import com.eco.fanliapp.entity.AppGoodsClassify;
import com.eco.fanliapp.service.IAppGoodsClassifyService;
import com.eco.fanliapp.utils.Convert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 分类 服务层实现
 * 
 * @author xiaoxx
 * @date 2019-04-25
 */
@Service
public class AppGoodsClassifyServiceImpl extends ServiceImpl<AppGoodsClassifyMapper, AppGoodsClassify> implements IAppGoodsClassifyService
{
	@Autowired
	private AppGoodsClassifyMapper appGoodsClassifyMapper;

	/**
     * 查询分类信息
     * 
     * @param tableId 分类ID
     * @return 分类信息
     */
    @Override
	public AppGoodsClassify selectAppGoodsClassifyById(Integer tableId)
	{
	    return appGoodsClassifyMapper.selectAppGoodsClassifyById(tableId);
	}
	
	/**
     * 查询分类列表
     * 
     * @param appGoodsClassify 分类信息
     * @return 分类集合
     */
	@Override
	public List<AppGoodsClassify> selectAppGoodsClassifyList(AppGoodsClassify appGoodsClassify)
	{
	    return appGoodsClassifyMapper.selectAppGoodsClassifyList(appGoodsClassify);
	}
	
    /**
     * 新增分类
     * 
     * @param appGoodsClassify 分类信息
     * @return 结果
     */
	@Override
	public int insertAppGoodsClassify(AppGoodsClassify appGoodsClassify)
	{
	    return appGoodsClassifyMapper.insertAppGoodsClassify(appGoodsClassify);
	}
	
	/**
     * 修改分类
     * 
     * @param appGoodsClassify 分类信息
     * @return 结果
     */
	@Override
	public int updateAppGoodsClassify(AppGoodsClassify appGoodsClassify)
	{
	    return appGoodsClassifyMapper.updateAppGoodsClassify(appGoodsClassify);
	}

	/**
     * 删除分类对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteAppGoodsClassifyByIds(String ids)
	{
		return appGoodsClassifyMapper.deleteAppGoodsClassifyByIds(Convert.toStrArray(ids));
	}
	
}
